package com.lywz.web.action.city;

import java.util.Collection;

import com.lywz.biz.common.entity.city.CityEntertainment;
import com.lywz.biz.common.entity.city.CityInfo;
import com.lywz.biz.common.entity.city.CityTourismOrganization;
import com.lywz.biz.common.entity.city.CityTraffic;
import com.lywz.web.struts.GZAbstracterAction;

public class ShowCityInfoAction extends GZAbstracterAction {

    private static final long serialVersionUID = 2556278844467682048L;

    // 城市列表
    private Collection<CityInfo> basicInfoList;

    //单个城市基本信息
    private CityInfo cityBasicInfo;

    //单个城市交通信息
    private CityTraffic traffic;

    //数据库中自增的id,真正的主键
    private Short id;

    //单个城市id
    private Short cityId;

    //市内机构
    private Collection<CityTourismOrganization> insideOrgList;

    //市外区县
    private Collection<CityTourismOrganization> outsideOrgList;
    
    //城市娱乐
    private CityEntertainment entertainment;
   
    //所有城市简介信息（二级首页）
    public String overviewHome() {
        basicInfoList = cityInfoService.getCityInfo();
        return SUCCESS;
    }

    //单个城市的概览
    public String overviewOneCity() {
        cityBasicInfo = cityInfoService.getOneCityById(id);
        return SUCCESS;
    }

    //单个城市交通信息
    public String cityTraffic() {
        traffic = cityInfoService.getCityTrafficByCityId(cityId);
        return SUCCESS;
    }

    //单个城市旅游机构
    public String organization() {
        insideOrgList = cityInfoService.getInsideOrg(cityId);
        outsideOrgList = cityInfoService.getOutsideOrg(cityId);
        return SUCCESS;
    }

    //单个城市的城市娱乐信息
    public String entertainment(){
        entertainment = cityInfoService.getEntertainmentByCityId(cityId);
        return SUCCESS;
    }
    /////////////////// getter and setter ////////////////

    public Short getCityId() {
        return cityId;
    }

    public void setCityId(Short cityId) {
        this.cityId = cityId;
    }

    public Collection<CityInfo> getBasicInfoList() {
        return basicInfoList;
    }

    public void setCityBasicInfo(CityInfo cityBasicInfo) {
        this.cityBasicInfo = cityBasicInfo;
    }

    public CityInfo getCityBasicInfo() {
        return cityBasicInfo;
    }

    public CityTraffic getTraffic() {
        return traffic;
    }

    public Collection<CityTourismOrganization> getInsideOrgList() {
        return insideOrgList;
    }

    public void setInsideOrgList(Collection<CityTourismOrganization> insideOrgList) {
        this.insideOrgList = insideOrgList;
    }

    public Collection<CityTourismOrganization> getOutsideOrgList() {
        return outsideOrgList;
    }

    public void setOutsideOrgList(Collection<CityTourismOrganization> outsideOrgList) {
        this.outsideOrgList = outsideOrgList;
    }

    public Short getId() {
        return id;
    }

    public void setId(Short id) {
        this.id = id;
    }

    
    public CityEntertainment getEntertainment() {
        return entertainment;
    }

    
    public void setEntertainment(CityEntertainment entertainment) {
        this.entertainment = entertainment;
    }

}
